Mathematics
Previous  Top  Next



The Clip syntax is also capable of calculating mathematical expressions. The advantage of the Clipbook is that you can create Clip Wizards to define the values of variables. You can create Clips that will either paste the result in your document or display it in an information window.

^$Calc(Expression[;Decimals])$

Calculates mathematical expressions. Use the optional Decimals parameter to define how many decimals should be displayed; if this parameter is not used, integers are returned as whole numbers, and real numbers are configured with two decimal figures.

"Expression" can be any mathematical expression using the operators and functions listed under the
Calculate in NoteTab topic. You can optionally define how many decimal values should be displayed in the result by placing a figure after the expression separated by a semicolon (;).

For example: ^$Calc(7/11;3)$ will return the result 0.636

You can also add prompts to supply values to variables. The following example will prompt the user to define a value for x and the number of decimals that the answer should display:

^$Calc(Sin(^?[Sin(x): Enter a value for x]);^?[Decimals])$


See the Utilities library for some examples.